#include <iostream>
using namespace std;
class CRectangle
{
protected:
      int w, h;
public:
      void setValues (int a, int b);
public:
      int area ();
};
void CRectangle::setValues (int a, int b)
{ 
     w=a;
     h=b;
}
int CRectangle::area ()
{
     return (w* h);
}
class CTriangle
{
 protected:
      int w, h;
public:
      void setValues (int a, int b);
       int area ();
};
void CTriangle::setValues(int a, int b)
{
	w=a;
	h=b;
}
int CTriangle::area()
{
	return(w*h/2);
}
int main()
{
	CRectangle rect;
	CTriangle trgl;
	rect.setValues(4,5);
	trgl.setValues(4,5);
	cout<<rect.area()<<endl;
	cout<<trgl.area()<<endl;
	return 0;
}